package com.lwz.laboratory.service;


import com.lwz.laboratory.dao.SignupMapper;
import com.lwz.laboratory.entity.Laboratory;
import com.lwz.laboratory.entity.Recruitplan;
import com.lwz.laboratory.entity.Signup;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;

@Service
public class SignupService {
    @Autowired
    SignupMapper signupMapper;


    public void AddSignup(Signup signup){
        signup.setApplicanttime(new Timestamp(System.currentTimeMillis()));
        signupMapper.insertSelective(signup);
    }

    public Signup selectBystuid(String stuid){
        return  signupMapper.selectBystuid(stuid);

    }

    public void EditSignup(Signup signup){
        signupMapper.updateByPrimaryKeySelective(signup);
    }

    public List<Signup>  findresult(String stuid){
        return signupMapper.findinwresult(stuid);

    }
    //查全部报名
    public List<Signup>  findallsignforme(String applicant){
        return signupMapper.findallsignforme(applicant);

    }
//查通过审核的报名
    public List<Signup>  findpasssign(String applicant){
        return signupMapper.findallpasssign(applicant);

    }

    public List<Signup>  findsignforme(String stuid){
        return signupMapper.findsignforme(stuid);

    }




}
